<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>The Free Photo-On Website Template | Home :: w3layouts</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="./resources/css/style.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" type="text/css" href="./resources/css/table/reset.css" />
<link href="./resources/css/style5.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="./resources/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="./resources/js/accordion-single.js"></script>
<script type="text/javascript" src="./resources/js/jquery.js"></script>
<script type="text/javascript" src="./resources/js/jquery.resizableColumns.js"></script>
<script type="text/javaScript" src="./resources/js/require.js"></script>
<style type="text/css">
*{margin:0;padding:0;list-style-type:none;}
a,img{border:0;}
table{empty-cells:show;border-collapse:collapse;border-spacing:0;}
.demo{width:760px;margin:40px auto;}
.demo h2{font-size:18px;height:52px;color:#3366cc;text-align:center;}
.listext th{background:#eee;color:#3366cc;}
.listext th,.listext td{border:solid 1px #ddd;text-align:left;padding:10px;font-size:14px;}

.rc-handle-container{position:relative;}
.rc-handle{position:absolute;width:7px;cursor:ew-resize;*cursor:pointer;margin-left:-3px;}
</style>

<script  type="text/javascript"> 
$(document).ready(function(e) {
	$(window.top.document.body).attr('scrollHeight',$('body').attr('scrollHeight'));
});

Qfast.add('widgets', { path: "./resources/js/terminator2.2.min.js", type: "js", requires: ['fx'] });  
Qfast(false, 'widgets', function () {
	K.tabs({
		id: 'decoroll2',//焦点图包裹id  
		conId: "decoimg_a2",//大图域包裹id  
		tabId:"deconum2",//小圆点数字提示id
		tabTn:"a",
		conCn: '.decoimg_b2',//大图域配置class       
		auto: 1,//自动播放 1或0
		effect: 'fade',//效果配置
		eType: 'mouseover',// 鼠标事件
		pageBt:true,//是否有按钮切换页码
		bns: ['.prev', '.next'],//前后按钮配置class                          
		interval: 3000// 停顿时间  
	}) 
}) 
</script>
</head>
<body>
<div id="header" style="width:auto;height:96px;background-color:#9C0B0C;padding:3px 0 3px 7%;margin:0">
		<a href="index.html"><image src="./resources/images/logo.jpg" style="height:90px;width:90%"></image></a>
</div>
<div class="red">
    <div id="slatenav">
        <ul>
            <li class="active"><a href="${pageContext.request.contextPath }/index">Home</a></li> 
			<li><a href="${pageContext.request.contextPath }/confirm">在校证明</a></li>
			<li><a href="${pageContext.request.contextPath }/score">打印成绩</a></li>	
			<li><a href="${pageContext.request.contextPath }/require">检索</a></li>
        </ul>
    </div>
</div>
<div class="wrap">
	
	<div class="header-left" id="leftContent">
  
    	<section>
		<!--- Contact Starts Here ---->
        <div class="contact">
  			<span class="line"></span><a href="#" class="line-anchor"><font size="+2">查 询 预 约</font></a><span class="line"></span>
               <div class="clearfix"></div>
               <div class="row contact-form">
                    <div class="col-md-8">
                    <h3 class="contact-head" style="margin-left:5%">Fill Your Details</h3><br />
                    <form action="${pageContext.request.contextPath }/searchMessage" method="post">
	                     <div class="contact-select">
                         <select id="select" name="type" style="margin-left:34%;border-radius:5px;border-color:#4D5160">
                             <option value="0" selected disabled>请选择查询项目</option>
                             <option value="1">在线证明</option>
                             <option value="2">打印成绩</option>
                         </select>
                         <font id='sele' size=3 color=red></font><br />
                         </div><br />
                         <div class="contact-text" style="margin-left:34%;width:85%">
                            <input type="text" placeholder="学号" id="stu_number" name="stu_number" onblur="Stu_Num()"/>
                            <font id='stu_num' size=3 color=red></font><br />
                        </div>
                        <div class="contact-but">
                            <input type="submit" onclick='return Button()' style="margin-right:34%" />
                        </div>
                   </form>
                   <c:if test="${error!=null }">
                   ${error }
                   </c:if>
                   <c:if test="${message!=null }">
                       <div class="demo"><br /><br /><br /><p>
					   <h1>查询信息</h1><br />
						<table class="table listext" data-resizable-columns-id="demo-table">				
                        	
							<thead>
								<tr>
									<th data-resizable-column-id="#">名称</th>
									<th data-resizable-column-id="first_name">学号</th>
									<th data-resizable-column-id="number">电话</th>
									<th data-resizable-column-id="last_name">日期</th>
									<th data-resizable-column-id="username" id="username-column" data-noresize>状态</th>
								</tr>
							</thead>
							<tbody>
							
                            <c:forEach items="${message }" var="c">
								<tr>
									<td><c:out value="${c.username }"/></td>
									<td><c:out value="${c.stu_number }"/></td>
									<td><c:out value="${c.number}"/></td>
									<td><c:out value="${c.day }"/></td>
									<td style="color: blue">
									<c:if test="${c.state == 0}">未处理</c:if>
									<c:if test="${c.state == 1}">已处理</c:if>
									<c:if test="${c.state == 2}">已驳回</c:if>
									</td>
								</tr>
							</c:forEach>
								
							</tbody>
						</table>
					</div>
				</c:if>    
                </div>
            </div>
        </div>
        <!--- Contact Ends Here ---->
		</section>
    </div>
    <hr style="width:100%;color:#ccc">
    <div class="ftr-bg">
        <div class="footer" style="height:5%;width:auto;padding-top:3px;">
            <p class="w3-link"><span>© All Rights Reserved | Design by&nbsp; <a href="http://w3layouts.com/"> W3L9</a></span></p>
        </div>
    </div>

</div>
</body>
</html>